package com.my.selectcoursesystem.service.serviceImpl;

import com.my.selectcoursesystem.bean.SelectStudent;
import com.my.selectcoursesystem.dao.SelectStudentDao;
import com.my.selectcoursesystem.service.SelectStudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("SelectStudentService")
public class SelectStudentServiceImpl implements SelectStudentService {
    @Autowired
    private SelectStudentDao selectStudentDao;

    public SelectStudentServiceImpl() {
    }

    public SelectStudentServiceImpl(SelectStudentDao selectStudentDao) {
        this.selectStudentDao = selectStudentDao;
    }

    @Override
    public List<SelectStudent> getAllByTid(String tid) {
        return this.selectStudentDao.findAllByTeacherid(tid);
    }
}
